Skip to content

nvme: add support for sanitize wait option#3438

Open
ikegami-t wants to merge 6 commits into
linux-nvme:masterfrom
ikegami-t:sanitize-wait
Open

nvme: add support for sanitize wait option#3438
ikegami-t wants to merge 6 commits into
linux-nvme:masterfrom
ikegami-t:sanitize-wait

Conversation

@ikegami-t

Copy link
Copy Markdown
Contributor

The option is for waiting sanitize completion.

The option is for waiting sanitize completion.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
@yonasabeselom

Copy link
Copy Markdown

Thank you, will follow the updated commit closely.

On SANICAP verification — that would be a valuable addition. The specific gap it addresses: a drive that does not support the requested sanitize action (CDW10=0x02, 0x01, or 0x04) can return an error that is easy to miss without pre-flight capability checking. A pre-flight SANICAP check before dispatching the first cycle would prevent issuing unsupported actions entirely.

AAD-50 documents the recommended SANICAP check as:

sudo nvme id-ctrl /dev/nvme0 | grep sanicap

The wait and repeat options together implement exactly the verification architecture RFC #3415 proposed — per-cycle confirmed completion via Log Page 0x81 with multi-cycle redundancy. Having both natively in nvme-cli means operators no longer need a separate tool for verified multi-cycle sanitization. That is a significant step forward for the ecosystem.

Make verified multi-cycle sanitization accessible without a separate tool.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Also add sanicap shift and mask definitions to get.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
This is to prevent issuing unsupported actions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
@ikegami-t

ikegami-t commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi, Just pushed the SANICAP verifiation changes also and some fixes for the repaat repeat option. Thank you.

@yonasabeselom

Copy link
Copy Markdown

Hi, Just pushed the SANICAP verifiation changes also and some fixes for the repaat repeat option. Thank you.

This means the tool now confirms capability before dispatching any cycle, preventing silent failures on drives that report supporting an action they do not actually implement.

PR #3438 now has the complete verification stack. Per-cycle SSTAT confirmation via --wait, multi-cycle redundancy via --repeat N, and SANICAP pre-flight capability check. That is everything RFC #3415 was asking for.
Looking forward to seeing it merged.

These options for the multi-cycle sanitization accessible.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
These options for the multi-cycle sanitization accessible.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants